home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BUG 1
/
BUGCD1996_0708.ISO
/
pc
/
util
/
minilin
/
minilin.exe
/
ROOT
/
ESOTERIC.{_C
< prev
next >
Wrap
Text File
|
1995-01-15
|
2KB
|
98 lines
#!/sbin/dip
# Set the local and remote ends of the link.
get $local slip1
get $remote orthanc
# Set the desired serial port and speed.
port modem
speed 19200
# Set eight-bit clean comms (it's the default, but it can't hurt).
databits 8
parity N
stopbits 1
# Define the modem initialisation string.
# init AT&F&K3&D2&C1&S1%C2
# init ATZ
# Turn on echoing of the control commands, responses etc.
echo on
# Reset the modem and terminal line. NB some people report having
# problems dialing after using this. It also slows down the login.
# Uncomment the next three lines if you need to reset the modem here.
# reset
# wait OK 10
# if $errlvl != 0 goto error1
top:
dial 7165651
# Check to see if all is OK.
if $errlvl != 0 goto error2
# If we get a successful CONNECT, go on to the login section, else retry.
wait CONNECT 60
if $errlvl == 0 goto login
# Retry. This does not limit the number of retries. It is for manual
# operation only! This reset may also disrupt dialling on some modems.
# Uncomment the next three lines if you need to reset the modem here.
# reset
# wait OK 3
# if $errlvl != 0 goto error1
print
print Trying again ...
sleep 30
goto top
login:
# We are now connected. Log in to the system. You should not normally
# need to provoke the login prompt with the next two lines.
# sleep 3
# send \r\n\r\n
wait ogin: 60
if $errlvl != 0 goto error3
sleep 1
send slip\n
# This route is the default route. The mtu must match the mru above.
get $mtu 296
default
# Announce the connection.
print
print CONNECTED via $remote with address $rmtip
# Make a compressed SLIP connection.
mode CSLIP
goto exit
# Error handling section.
error1:
print Error resetting modem - OK not received.
goto error
error2:
print Error in dialling.
goto error
error3:
print Error waiting for login prompt.
goto error
error4:
print Error waiting for password prompt.
goto error
error5:
print Error waiting for protocol prompt.
goto error
error6:
print Error waiting for HELLO prompt.
goto error
error:
print SLIP failed.
# Exit ...
exit: